/*
* @author Cole Gehlen
*/
package com.apps.test;
import static org.junit.Assert.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.List;
import org.junit.Test;
import com.apps.datastore.dao.BookInformation;
import com.apps.datastore.dao.CourseInformationObject;
import com.apps.datastore.dao.SectionInformationObject;
import com.apps.datastore.dao.UniqueCourseObject;
import com.apps.services.UBCCourseSpiderService;
import com.apps.services.UBCSectionDetailService;
import com.apps.services.factory.UBCSectionDetailServiceFactory;
public class UBCSectionDetailServiceTest {
@Test
public void test() throws MalformedURLException, IOException {
UBCSectionDetailService uss = UBCSectionDetailServiceFactory.getUBCSectionDetailService();
//
// String url = "https://courses.students.ubc.ca/cs/main?pname=subjarea&tname=subjareas&req=5&dept="
// + "CPSC" + "&course=" + "304" + "§ion=" + "101";
//
// BufferedReader br = new BufferedReader(new InputStreamReader(new URL(url).openStream()));
//
//
// String line = br.readLine();
// int i = 0;
// for(; line != null; i++){
// line = br.readLine();
// }
// System.out.println(i);
assertTrue(uss.init("CSPC", "304", "101") >= 0);
}
}